﻿using DiceRoller.Dice;
using Microsoft.Xna.Framework;

namespace Roller.Animation
{
    /// <summary>
    /// Defines the minimum requirements for objects that are to be rendered to the screen.
    /// </summary>
    public interface IRenderedDie
    {
        #region Properties

        /// <summary>
        /// The die based object which manages the value "rolling" for the die.  This object will be referenced in order to generate the 
        /// roll value rendered to the screen.
        /// </summary>
        /// <value>A <see cref="BoundedDie"/> object.</value>
        BoundedDie Die
        {
            get;
            set;
        }

        /// <summary>
        /// The current position of the die in 2d space as rendered by the viewing element.
        /// </summary>
        /// <value>A <see cref="Vector2"/> object.</value>
        Vector2 Position
        {
            get;
            set;
        }

        /// <summary>
        /// The current velocity relative to the containing object of the die.  With the application of "science" and "physics"
        /// we will be able to replicate friction and other phenomena.
        /// </summary>
        /// <value>A <see cref="Vector2"/> object.</value>
        Vector2 Velocity
        {
            get;
            set;
        }

        #endregion

        #region Methods

        /// <summary>
        /// Method called once the Position and Velocity have been set.  Will trigger the "movement" of the object on 
        /// the canvas by adding the velocity to the position, generating a new position.
        /// </summary>
        void Update();

        /// <summary>
        /// Method for "rolling" the die (utilizing the underlying <see cref="BoundedDie"/> object), and initializes the UI rendering / animation.
        /// </summary>
        void Roll();

        #endregion
    }
}
